package cn.zero.controller;

import cn.zero.entity.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    //加载端口
    @Value("${server.port}")
    private int port;

    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable Long id){
        return User.builder().id(1L).name("哈哈哈").intro("俺来啦"+ port).build();
    }
}
